import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  // Image optimization and remote sources
  images: {
    remotePatterns: [
      { protocol: "https", hostname: "res.cloudinary.com" },
      { protocol: "https", hostname: "images.unsplash.com" },
      { protocol: "https", hostname: "cdn.pixabay.com" },
      { protocol: "https", hostname: "lh3.googleusercontent.com" },
      { protocol: "https", hostname: "*.alicdn.com" },
      { protocol: "https", hostname: "ui-avatars.com" },
    ],
  },
  // Enable experimental features for middleware
  experimental: {
    serverActions: {
      bodySizeLimit: '2mb',
    },
  },
};

export default nextConfig;
